package com.mes.kpi.domain;
// default package

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.GenericGenerator;

import com.mes.basicdata.domain.Dept;
import com.mes.common.domain.BasicModel;

/**
 * KPIHeader entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class KPIHeader extends BasicModel  {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GenericGenerator(name = "uniqueId", strategy = "assigned")
	@Column(name = "KPIUID")
	protected String uniqueId;
	
	@Column(name = "DEPTID")
	private String deptUid;
	@ForeignKey(name="null")
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="DEPTID",insertable=false,updatable=false)
	private Dept dept;
	
	@Column(name = "PRODUCTID")
	private String productId;
	
	@Column(name = "TIMEID")
	private String timeId;
	
	@Column(name = "KPIVALUE")
	private Double kpiValue;
	
	@Column(name = "CHECKSTATE")
	private String checkState;
	
	@Column(name = "CHECKTIME")
	private Date checkTime;
	
	@Column(name = "ACTUALCHECKTIME")
	private Date actualCheckTime;
	
	@Column(name = "CHECKER")
	private String checkerUid;
	
	@Column(name = "KPIID")
	private String kpiDefinitonId;
	
	@Column(name = "CHECKFROMDATE")
	private Date checkFromDate;
	
	@Column(name = "CHECKTODATE")
	private Date checkToDate;
	
	@Column(name = "TARGETVALUE")
	private Double targetValue;
	
	@Column(name = "CHALLENGEVALUE")
	private Double challengeValue;
	
	
	// Constructors

	public Dept getDept() {
		return dept;
	}

	public void setDept(Dept dept) {
		this.dept = dept;
	}

	/** default constructor */
	public KPIHeader() {
	}

	@Override
	public String getUuid() {
		// TODO Auto-generated method stub
		return this.getUniqueId();
	}

	@Override
	public void setUuid(String uuid) {
		// TODO Auto-generated method stub
		this.setUniqueId(uuid);
	}

	public String getUniqueId() {
		return uniqueId;
	}

	public void setUniqueId(String uniqueId) {
		this.uniqueId = uniqueId;
	}


	public String getDeptUid() {
		return deptUid;
	}

	public void setDeptUid(String deptUid) {
		this.deptUid = deptUid;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getTimeId() {
		return timeId;
	}

	public void setTimeId(String timeId) {
		this.timeId = timeId;
	}

	public Double getKpiValue() {
		return kpiValue;
	}

	public void setKpiValue(Double kpiValue) {
		this.kpiValue = kpiValue;
	}

	public String getCheckState() {
		return checkState;
	}

	public void setCheckState(String checkState) {
		this.checkState = checkState;
	}

	public Date getCheckTime() {
		return checkTime;
	}

	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}

	public Date getActualCheckTime() {
		return actualCheckTime;
	}

	public void setActualCheckTime(Date actualCheckTime) {
		this.actualCheckTime = actualCheckTime;
	}

	public String getCheckerUid() {
		return checkerUid;
	}

	public void setCheckerUid(String checkerUid) {
		this.checkerUid = checkerUid;
	}

	public String getKpiDefinitonId() {
		return kpiDefinitonId;
	}

	public void setKpiDefinitonId(String kpiDefinitonId) {
		this.kpiDefinitonId = kpiDefinitonId;
	}

	public Date getCheckFromDate() {
		return checkFromDate;
	}

	public void setCheckFromDate(Date checkFromDate) {
		this.checkFromDate = checkFromDate;
	}

	public Date getCheckToDate() {
		return checkToDate;
	}

	public void setCheckToDate(Date checkToDate) {
		this.checkToDate = checkToDate;
	}

	public Double getTargetValue() {
		return targetValue;
	}

	public void setTargetValue(Double targetValue) {
		this.targetValue = targetValue;
	}

	public Double getChallengeValue() {
		return challengeValue;
	}

	public void setChallengeValue(Double challengeValue) {
		this.challengeValue = challengeValue;
	}
}